package edu.zut.hb.software.chat.service.impl;


import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.chat.dao.ChatGroupDao;
import edu.zut.hb.software.chat.domain.ChatGroup;
import edu.zut.hb.software.chat.service.ChatGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class ChatGroupServiceImpl extends GenericTreeManagerImpl<ChatGroup, Long>
        implements ChatGroupService {


	ChatGroupDao chatGroupDao;

    @Autowired
    public void ChatGroupDao(ChatGroupDao chatGroupDao) {
        this.chatGroupDao = chatGroupDao;
        this.treeDao=chatGroupDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
            	ChatGroup c = new ChatGroup();
            	c.setChatnums("组内聊天室"+i);
            	c.setPhone("电话号码"+i);
                list.add(c);
            }
            return list;

        }




}
